package com.binyouwei.designpatterns.structural_type.flyweight;

/**
 * @author 宾有为
 * @date 2024/7/3 21:10
 * @link https://blog.csdn.net/baidu_41616022?type=blog
 * @describe：实现接口的实体类
 **/
public class FlyweightCircle implements FlyweightShape {
    private String color;
    private int x;
    private int y;
    private int radius;

    public FlyweightCircle(String color) {
        this.color = color;
    }

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }

    public void setRadius(int radius) {
        this.radius = radius;
    }

    @Override
    public void draw() {
        System.out.println("FlyweightCircle: Draw() [Color : " + color + ", x : " + x + ", y :" + y + ", radius :" + radius);
    }
}
